﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SmartSpace.Core
{
    public partial class CoreService : ICoreService
    {
        public Application GetApplication(string hostUrl)
        {
            using (CoreContext context = _contextFactory.Get())
            {
                return context.Set<Application>()
                    .Where(p => p.HostUrl == hostUrl)
                    .FirstOrDefault();
            }
        }
    }
}
